/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package SemanticoPacote;

/**
 *
 * @author Larissa Rocha Soares
 */
public class Utils
{

    public static String tipoValor(String numero)
    {
        int contFloat = 0;
        if(numero.equals("true")||numero.equals("false"))
            return "boolean";
        if(numero.charAt(0)=='\"' &&numero.length()==3)
            return "char";
        if(numero.charAt(0)=='\"' &&numero.length()>3)
            return "string";

        for(int i = 0;i<numero.length();i++)
        {
            if(numero.charAt(i)=='.')
                contFloat++;                
        }
        if(contFloat>0)
            return "float";
        else
            return "int";
    }
}
